// 同意管理用户相关的接口

import request from "@/utils/request";
import type { loginForm, loginResponseData, userResponseData } from "./type";

//同意管理接口
enum API {
    LOGIN_URL = "/user/login", //登录
    USER_INFO_URL = "/user/info", //用户信息
}

//登录
export const reqLogin = (data: loginForm) => {
    return request.post<any, loginResponseData>(API.LOGIN_URL, data);
};

// 获取用户信息
export const requestUserInfo = () => {
    return request.get<any, userResponseData>(API.USER_INFO_URL);
}